package com.bestcem.xm.qdes.service;

import cn.hutool.json.JSONObject;
import com.bestcem.xm.component.mybatis.service.IXmService;
import com.bestcem.xm.qdes.controller.param.*;
import com.bestcem.xm.qdes.controller.vo.*;
import com.bestcem.xm.qdes.entity.QdesProject;
import com.bestcem.xm.qdes.entity.QdesQstruct;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface QdesQstructService extends IXmService<QdesQstruct> {

    Map<String, Object> addTemplates(String id, QstructsTemplatesParam qstructsParam);

    void editTemplates(String id, String tid, QstructsTemplatesParam qstructsParam) throws Exception;

    DeletedCountVo deleteTemplates(String id, String tid);

    List<QstructsTemplatesVo> getTemplates(String id, String search);

    QstructsTemplatesVo getEditTemplates(String id, String tid);

    Map addCss(String id, QstructsCssParam css) throws Exception;

    Map uploadFileInfo(String id, MultipartFile file, boolean keepext) throws Exception;

    List<QstructsAttachmentsVo> getAttachments(String id, String search);

    DeletedCountVo deleteAttachments(String id, String tid);

    String putScores(String id, JSONObject scoresJson);

    Map getScores(String id);

    Map getScoreConfig(String id);

    String putScoreConfig(String id, JSONObject scoresJson);

    String putOutward(String id, Map outward);

    BigDecimal getMaxScores(String id);

    List<Object> postPolicys(String id, List<Map> policyParam);

    Map putPolicys(String id, Map policyParam) throws Exception;

    List<QstructsDetailVo> getPublishRecord(GetPublishRecordParam param);

    void importStructs(String id, ImportStructParam param);

    QdesProjectVo projectQStructImport(String id, ProjectCreateParam param);

    void updateQstruct(QdesQstruct qstruct, com.alibaba.fastjson.JSONObject params, QdesProject proj, boolean updateExt, boolean forTemplet);
}
